package com.hrm.controller;

import com.hrm.dto.ResponseDTO;
import com.hrm.service.HomeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@RestController
@RequestMapping("/home")
public class HomeController {

    @Resource
    private HomeService homeService;

    @GetMapping("/count")
    public ResponseDTO getCountData() {
        return this.homeService.getCountData();
    }

    @GetMapping("/department")
    public ResponseDTO getDepartmentData() {
        return this.homeService.getDepartmentData();
    }

    @GetMapping("/room")
    public ResponseDTO getRoomData() {
        return this.homeService.getRoomData();
    }

}
